package com.qf.admin.controller;


import com.qf.admin.entity.Cart;
import com.qf.admin.service.ICartService2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cart")
public class CartController2 {

    private ICartService2 cartService;

    public CartController2(ICartService2 cartServiceImpl2) {
        this.cartService = cartServiceImpl2;
    }

    @GetMapping("/{id}")
    public List<Cart> getReceiptCart(@PathVariable("id") Integer id){

        System.out.println("===========11111========");

        List<Cart> cartList = cartService.getReceiptCart(id);

        return cartList;
    }


}
